package com.jack.blog.service;

import com.jack.blog.vo.info.BlogInfo;
import com.jack.blog.vo.BlogVo;

import java.util.List;

public interface BlogService {
    /**
     * uid =0 means all blogs and page=0 means not limit
     * @param page
     * @return
     */
    List<BlogVo> getBlogs(int uid,int page);
    List<BlogVo> getBlogsByTitle(int uid,int page,String title);
    List<BlogVo> getBlogsByCid(int cid, int page);
    BlogVo getBlog(int bid);
    int addBlog(int uid, BlogInfo blogInfo)throws Exception;
    void updateBlogInfo(int bid, BlogInfo blogInfo)throws Exception;
    void deleteBlog(int bid) throws Exception;
}
